<template>
	<el-dialog  v-model="show" title="发票抬头管理" width="580" align-center>
        <el-form  ref="ruleFormRef"  style="max-width: 600px"  :model="ruleForm"  :rules="rules"  label-width="auto"  class="demo-ruleForm"  :size="formSize"  status-icon>
        <el-form-item label="名称" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入单位名称"/>
        </el-form-item>
        <el-form-item label="税号" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入纳税人识别号"/>
        </el-form-item>
        <el-form-item label="单位地址" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入单位地址信息"/>
        </el-form-item>
        <el-form-item label="电话号码" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入电话号码"/>
        </el-form-item>
        <el-form-item label="开户银行" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入开户银行全称"/>
        </el-form-item>
        <el-form-item label="银行账号" prop="name">
          <el-input v-model="ruleForm.name" placeholder="请输入银行账号"/>
        </el-form-item>
    </el-form>
        <template #footer>
            <div class="dialog-footer">
                <el-button type="primary" @click="submit(ruleFormRef)" color="#0071bb">确定</el-button>
                <el-button @click="close()">取消</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script lang="ts" setup>
import { defineProps,defineEmits,toRefs } from 'vue';
const emit = defineEmits(['close','submit']);
const props = defineProps<{ formData:any }>();
import { reactive, ref } from 'vue'
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'

interface RuleForm {
  name: string
}

const formSize = ref<ComponentSize>('default')
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
  name: '',
})


const rules = reactive<FormRules<RuleForm>>({
  name: [
    { required: true, message: '请输入单位名称', trigger: 'blur' },
  ],
})
// 取消
const close = () => {
    emit('close')
}
// 确定
const submit = () => {
  emit('submit')
}
const show = ref<boolean>(true)
</script>

<style lang="scss" scoped>
.df{
    display: flex;
    align-items: center;
}
.fd{
  font-weight:bold;
}
.list{
    padding: 0 30px;

    box-sizing: border-box;
    .item{
        height: 40px;
        line-height: 40px;
        color: #4D4D4D;
        font-size: 16px;
        position: relative;
        .name{
            width: 180px;
            display: inline-block;
            text-align: right;
        }
        .value{
          margin-left:10px;
        }
        .tip{
            color:#989898;
            font-size:12px;
        }
    }
}
.dialog-footer{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
}
</style>